/**
 * 
 */
package com.ph.irp.base.assistantmaterial.service.impl;

import java.util.List;

import com.ph.irp.base.assistantmaterial.dao.PBaseAssistantmaterialIndustryDao;
import com.ph.irp.base.assistantmaterial.service.AssistantmaterialIndustryService;
import com.ph.irp.model.PBaseAssistantmaterialIndustry;

/**
 * @author Administrator
 * 
 */
public class PBaseAssistantmaterialIndustryServiceImpl implements
		AssistantmaterialIndustryService {
	// 行业dao
	private PBaseAssistantmaterialIndustryDao assistantmaterialIndustryDao = null;
	// 行业集合
	private List<PBaseAssistantmaterialIndustry> pbseAssistantmaterialIndustryList = null;
	// 行业
//	private PBaseAssistantmaterialIndustry pbseAssistantmaterialIndustry = null;

	/**
	 * 添加行业信息
	 */
	@Override
	public void addAssistantmaterialIndustry(
			PBaseAssistantmaterialIndustry pbaseAssistantmaterialIndustry)
			throws Throwable {
		assistantmaterialIndustryDao
				.addPBaseAssistantmaterialIndustry(pbaseAssistantmaterialIndustry);
	}

	/**
	 * 根据id删除行业
	 */

	@Override
	public void deleteAssistantmaterialIndustry(Object[] IndustryIDs)
			throws Throwable {
		assistantmaterialIndustryDao
				.deletePBaseAssistantmaterialIndustryById(IndustryIDs);
	}

	/**
	 * 查询所有行业信息
	 * 
	 * @throws Throwable
	 */
	public List<PBaseAssistantmaterialIndustry> getAllAssistantmaterialIndustry()
			throws Throwable {
		return assistantmaterialIndustryDao
				.getAllPBaseAssistantmaterialIndustry();
	}

	/**
	 * 根据Id查找行业信息
	 */
	@Override
	public PBaseAssistantmaterialIndustry getAssistantmaterialIndustryById(
			int industryID) throws Throwable {
		return assistantmaterialIndustryDao
				.getPBaseAssistantmaterialIndustryById(industryID);
	}

	/**
	 * 修改行业信息
	 */
	@Override
	public void updateAssistantmaterialIndustry(
			PBaseAssistantmaterialIndustry pbaseAssistantmaterialIndustry)
			throws Throwable {
		assistantmaterialIndustryDao
				.updatePBaseAssistantmaterialIndustry(pbaseAssistantmaterialIndustry);
	}

	/**
	 * @return the assistantmaterialIndustryDao
	 */
	public PBaseAssistantmaterialIndustryDao getAssistantmaterialIndustryDao() {
		return assistantmaterialIndustryDao;
	}

	/**
	 * @param assistantmaterialIndustryDao
	 *            the assistantmaterialIndustryDao to set
	 */
	public void setAssistantmaterialIndustryDao(
			PBaseAssistantmaterialIndustryDao assistantmaterialIndustryDao) {
		this.assistantmaterialIndustryDao = assistantmaterialIndustryDao;
	}

	public List<PBaseAssistantmaterialIndustry> getPbseAssistantmaterialIndustryList() {
		return pbseAssistantmaterialIndustryList;
	}

	public void setPbseAssistantmaterialIndustryList(
			List<PBaseAssistantmaterialIndustry> pbseAssistantmaterialIndustryList) {
		this.pbseAssistantmaterialIndustryList = pbseAssistantmaterialIndustryList;
	}

//	public PBaseAssistantmaterialIndustry getPbseAssistantmaterialIndustry() {
//		return pbseAssistantmaterialIndustry;
//	}
//
//	public void setPbseAssistantmaterialIndustry(
//			PBaseAssistantmaterialIndustry pbaseAssistantmaterialIndustry) {
//		this.pbseAssistantmaterialIndustry = pbseAssistantmaterialIndustry;
//	}

	/**
	 * 根据行业代码查询行业信息
	 */
	@Override
	public List<PBaseAssistantmaterialIndustry> getAllAssistantmaterialIndustryByCode(
			String industryCode) throws Throwable {
		return assistantmaterialIndustryDao
				.getPBaseAssistantmaterialIndustryByCode(industryCode);
	}

	/**
	 * 根据行业代码和名称查询行业信息
	 */
	@Override
	public List<PBaseAssistantmaterialIndustry> getAllAssistantmaterialIndustryByCodeAndName(
			String industryCode, String industryName) throws Throwable {
		return assistantmaterialIndustryDao
				.getPBaseAssistantmaterialIndustryByCodeAndName(industryCode,
						industryName);
	}

	/**
	 * 根据行业名称查询行业信息
	 */
	@Override
	public List<PBaseAssistantmaterialIndustry> getAllAssistantmaterialIndustryByName(
			String industryName) throws Throwable {
		return assistantmaterialIndustryDao
				.getPBaseAssistantmaterialIndustryByName(industryName);
	}

}